﻿namespace CKQDJK {
	using System;
	using SuperORM.Attributes;
	using System.ComponentModel;
	
	
	/// <summary>国家规划区域</summary>
	[Object("国家规划区域", "CKQDJK", "国家规划区域")]
	[Browsable(true)]
	[DisplayName("国家规划区域")]
	[ReadOnly(false)]
	[Serializable()]
	public class 国家规划区域 : SuperORM.BusinessObject {
		
		/// <summary>内部变量：CK_GUID</summary>
		private string m_CK_GUID;
		
		/// <summary>标示属性CK_GUID是否为空的字段。</summary>
		private bool m_IsCK_GUIDNull = true;
		
		/// <summary>内部变量：申请序号</summary>
		private int m_申请序号;
		
		/// <summary>标示属性申请序号是否为空的字段。</summary>
		private bool m_Is申请序号Null = true;
		
		/// <summary>内部变量：区域名称</summary>
		private string m_区域名称;
		
		/// <summary>标示属性区域名称是否为空的字段。</summary>
		private bool m_Is区域名称Null = true;
		
		/// <summary>内部变量：区域类别</summary>
		private string m_区域类别;
		
		/// <summary>标示属性区域类别是否为空的字段。</summary>
		private bool m_Is区域类别Null = true;
		
		/// <summary>内部变量：批准机关及文号</summary>
		private string m_批准机关及文号;
		
		/// <summary>标示属性批准机关及文号是否为空的字段。</summary>
		private bool m_Is批准机关及文号Null = true;
		
		/// <summary>内部变量：东经起</summary>
		private double m_东经起;
		
		/// <summary>标示属性东经起是否为空的字段。</summary>
		private bool m_Is东经起Null = true;
		
		/// <summary>内部变量：东经止</summary>
		private double m_东经止;
		
		/// <summary>标示属性东经止是否为空的字段。</summary>
		private bool m_Is东经止Null = true;
		
		/// <summary>内部变量：北纬起</summary>
		private double m_北纬起;
		
		/// <summary>标示属性北纬起是否为空的字段。</summary>
		private bool m_Is北纬起Null = true;
		
		/// <summary>内部变量：北纬止</summary>
		private double m_北纬止;
		
		/// <summary>标示属性北纬止是否为空的字段。</summary>
		private bool m_Is北纬止Null = true;
		
		/// <summary>内部变量：采深上限</summary>
		private double m_采深上限;
		
		/// <summary>标示属性采深上限是否为空的字段。</summary>
		private bool m_Is采深上限Null = true;
		
		/// <summary>内部变量：采深下限</summary>
		private double m_采深下限;
		
		/// <summary>标示属性采深下限是否为空的字段。</summary>
		private bool m_Is采深下限Null = true;
		
		/// <summary>内部变量：区域面积</summary>
		private double m_区域面积;
		
		/// <summary>标示属性区域面积是否为空的字段。</summary>
		private bool m_Is区域面积Null = true;
		
		/// <summary>内部变量：所在行政区</summary>
		private int m_所在行政区;
		
		/// <summary>标示属性所在行政区是否为空的字段。</summary>
		private bool m_Is所在行政区Null = true;
		
		/// <summary>内部变量：所在行政区名称</summary>
		private string m_所在行政区名称;
		
		/// <summary>标示属性所在行政区名称是否为空的字段。</summary>
		private bool m_Is所在行政区名称Null = true;
		
		/// <summary>内部变量：矿区编码</summary>
		private int m_矿区编码;
		
		/// <summary>标示属性矿区编码是否为空的字段。</summary>
		private bool m_Is矿区编码Null = true;
		
		/// <summary>内部变量：坐标系统</summary>
		private int m_坐标系统;
		
		/// <summary>标示属性坐标系统是否为空的字段。</summary>
		private bool m_Is坐标系统Null = true;
		
		/// <summary>内部变量：区域坐标</summary>
		private string m_区域坐标;
		
		/// <summary>标示属性区域坐标是否为空的字段。</summary>
		private bool m_Is区域坐标Null = true;
		
		/// <summary>内部变量：BSM</summary>
		private int m_BSM;
		
		/// <summary>标示属性BSM是否为空的字段。</summary>
		private bool m_IsBSMNull = true;
		
		public static string TypeID = "CKQDJK.国家规划区域";
		
		/// <summary>属性CK_GUID</summary>
		[Member("CK_GUID", "CK_GUID", "System.String", 80, false, false, "CK_GUID")]
		[Browsable(true)]
		[DisplayName("CK_GUID")]
		[ReadOnly(false)]
		public string CK_GUID {
			get {
				return this.m_CK_GUID;
			}
			set {
				this.m_CK_GUID = value;
				this.m_IsCK_GUIDNull = false;
			}
		}
		
		/// <summary>属性申请序号</summary>
		[Member("申请序号", "申请序号", "System.Int32", 4, false, false, "申请序号")]
		[Browsable(true)]
		[DisplayName("申请序号")]
		[ReadOnly(false)]
		public int 申请序号 {
			get {
				return this.m_申请序号;
			}
			set {
				this.m_申请序号 = value;
				this.m_Is申请序号Null = false;
			}
		}
		
		/// <summary>属性区域名称</summary>
		[Member("区域名称", "区域名称", "System.String", 200, false, false, "区域名称")]
		[Browsable(true)]
		[DisplayName("区域名称")]
		[ReadOnly(false)]
		public string 区域名称 {
			get {
				return this.m_区域名称;
			}
			set {
				this.m_区域名称 = value;
				this.m_Is区域名称Null = false;
			}
		}
		
		/// <summary>属性区域类别</summary>
		[Member("区域类别", "区域类别", "System.String", 100, false, false, "区域类别")]
		[Browsable(true)]
		[DisplayName("区域类别")]
		[ReadOnly(false)]
		public string 区域类别 {
			get {
				return this.m_区域类别;
			}
			set {
				this.m_区域类别 = value;
				this.m_Is区域类别Null = false;
			}
		}
		
		/// <summary>属性批准机关及文号</summary>
		[Member("批准机关及文号", "批准机关及文号", "System.String", 160, false, false, "批准机关及文号")]
		[Browsable(true)]
		[DisplayName("批准机关及文号")]
		[ReadOnly(false)]
		public string 批准机关及文号 {
			get {
				return this.m_批准机关及文号;
			}
			set {
				this.m_批准机关及文号 = value;
				this.m_Is批准机关及文号Null = false;
			}
		}
		
		/// <summary>属性东经起</summary>
		[Member("东经起", "东经起", "System.Double", 8, false, false, "东经起")]
		[Browsable(true)]
		[DisplayName("东经起")]
		[ReadOnly(false)]
		public double 东经起 {
			get {
				return this.m_东经起;
			}
			set {
				this.m_东经起 = value;
				this.m_Is东经起Null = false;
			}
		}
		
		/// <summary>属性东经止</summary>
		[Member("东经止", "东经止", "System.Double", 8, false, false, "东经止")]
		[Browsable(true)]
		[DisplayName("东经止")]
		[ReadOnly(false)]
		public double 东经止 {
			get {
				return this.m_东经止;
			}
			set {
				this.m_东经止 = value;
				this.m_Is东经止Null = false;
			}
		}
		
		/// <summary>属性北纬起</summary>
		[Member("北纬起", "北纬起", "System.Double", 8, false, false, "北纬起")]
		[Browsable(true)]
		[DisplayName("北纬起")]
		[ReadOnly(false)]
		public double 北纬起 {
			get {
				return this.m_北纬起;
			}
			set {
				this.m_北纬起 = value;
				this.m_Is北纬起Null = false;
			}
		}
		
		/// <summary>属性北纬止</summary>
		[Member("北纬止", "北纬止", "System.Double", 8, false, false, "北纬止")]
		[Browsable(true)]
		[DisplayName("北纬止")]
		[ReadOnly(false)]
		public double 北纬止 {
			get {
				return this.m_北纬止;
			}
			set {
				this.m_北纬止 = value;
				this.m_Is北纬止Null = false;
			}
		}
		
		/// <summary>属性采深上限</summary>
		[Member("采深上限", "采深上限", "System.Double", 8, false, false, "采深上限")]
		[Browsable(true)]
		[DisplayName("采深上限")]
		[ReadOnly(false)]
		public double 采深上限 {
			get {
				return this.m_采深上限;
			}
			set {
				this.m_采深上限 = value;
				this.m_Is采深上限Null = false;
			}
		}
		
		/// <summary>属性采深下限</summary>
		[Member("采深下限", "采深下限", "System.Double", 8, false, false, "采深下限")]
		[Browsable(true)]
		[DisplayName("采深下限")]
		[ReadOnly(false)]
		public double 采深下限 {
			get {
				return this.m_采深下限;
			}
			set {
				this.m_采深下限 = value;
				this.m_Is采深下限Null = false;
			}
		}
		
		/// <summary>属性区域面积</summary>
		[Member("区域面积", "区域面积", "System.Double", 8, false, false, "区域面积")]
		[Browsable(true)]
		[DisplayName("区域面积")]
		[ReadOnly(false)]
		public double 区域面积 {
			get {
				return this.m_区域面积;
			}
			set {
				this.m_区域面积 = value;
				this.m_Is区域面积Null = false;
			}
		}
		
		/// <summary>属性所在行政区</summary>
		[Member("所在行政区", "所在行政区", "System.Int32", 4, false, false, "所在行政区")]
		[Browsable(true)]
		[DisplayName("所在行政区")]
		[ReadOnly(false)]
		public int 所在行政区 {
			get {
				return this.m_所在行政区;
			}
			set {
				this.m_所在行政区 = value;
				this.m_Is所在行政区Null = false;
			}
		}
		
		/// <summary>属性所在行政区名称</summary>
		[Member("所在行政区名称", "所在行政区名称", "System.String", 80, false, false, "所在行政区名称")]
		[Browsable(true)]
		[DisplayName("所在行政区名称")]
		[ReadOnly(false)]
		public string 所在行政区名称 {
			get {
				return this.m_所在行政区名称;
			}
			set {
				this.m_所在行政区名称 = value;
				this.m_Is所在行政区名称Null = false;
			}
		}
		
		/// <summary>属性矿区编码</summary>
		[Member("矿区编码", "矿区编码", "System.Int32", 4, false, false, "矿区编码")]
		[Browsable(true)]
		[DisplayName("矿区编码")]
		[ReadOnly(false)]
		public int 矿区编码 {
			get {
				return this.m_矿区编码;
			}
			set {
				this.m_矿区编码 = value;
				this.m_Is矿区编码Null = false;
			}
		}
		
		/// <summary>属性坐标系统</summary>
		[Member("坐标系统", "坐标系统", "System.Int32", 4, false, false, "坐标系统")]
		[Browsable(true)]
		[DisplayName("坐标系统")]
		[ReadOnly(false)]
		public int 坐标系统 {
			get {
				return this.m_坐标系统;
			}
			set {
				this.m_坐标系统 = value;
				this.m_Is坐标系统Null = false;
			}
		}
		
		/// <summary>属性区域坐标</summary>
		[Member("区域坐标", "区域坐标", "System.String", -1, false, false, "区域坐标")]
		[Browsable(true)]
		[DisplayName("区域坐标")]
		[ReadOnly(false)]
		public string 区域坐标 {
			get {
				return this.m_区域坐标;
			}
			set {
				this.m_区域坐标 = value;
				this.m_Is区域坐标Null = false;
			}
		}
		
		/// <summary>属性BSM</summary>
		[Member("BSM", "BSM", true, true, "BSM")]
		[Browsable(true)]
		[DisplayName("BSM")]
		[ReadOnly(false)]
		public int BSM {
			get {
				return this.m_BSM;
			}
			set {
				this.m_BSM = value;
				this.m_IsBSMNull = false;
				if ((this.OnOIDChanged != null)) {
					this.OnOIDChanged(this, null);
				}
			}
		}
		
		/// <summary>对象ID发生变化的时候触发的事件</summary>
		public event SuperORM.Attributes.OIDChangedHandler OnOIDChanged;
		
		/// <summary>属性改变的时候</summary>
		public event SuperORM.PropertyChangeHandler PropertyChanged;
		
		// 重载的方法，判断两个对象是否相等，判断条件是两个对象的主键值是否相等。
		public override bool Equals(object obj) {
			国家规划区域 国家规划区域 = ((国家规划区域)(obj));
			if ((国家规划区域.BSM == this.m_BSM)) {
				return true;
			}
			else {
				return false;
			}
		}
		
		/// <summary>判断某一个属性是否为空</summary>
		public override bool IsNull(string propname) {
			if (propname.Equals("CK_GUID")) {
				return this.m_IsCK_GUIDNull;
			}
			if (propname.Equals("申请序号")) {
				return this.m_Is申请序号Null;
			}
			if (propname.Equals("区域名称")) {
				return this.m_Is区域名称Null;
			}
			if (propname.Equals("区域类别")) {
				return this.m_Is区域类别Null;
			}
			if (propname.Equals("批准机关及文号")) {
				return this.m_Is批准机关及文号Null;
			}
			if (propname.Equals("东经起")) {
				return this.m_Is东经起Null;
			}
			if (propname.Equals("东经止")) {
				return this.m_Is东经止Null;
			}
			if (propname.Equals("北纬起")) {
				return this.m_Is北纬起Null;
			}
			if (propname.Equals("北纬止")) {
				return this.m_Is北纬止Null;
			}
			if (propname.Equals("采深上限")) {
				return this.m_Is采深上限Null;
			}
			if (propname.Equals("采深下限")) {
				return this.m_Is采深下限Null;
			}
			if (propname.Equals("区域面积")) {
				return this.m_Is区域面积Null;
			}
			if (propname.Equals("所在行政区")) {
				return this.m_Is所在行政区Null;
			}
			if (propname.Equals("所在行政区名称")) {
				return this.m_Is所在行政区名称Null;
			}
			if (propname.Equals("矿区编码")) {
				return this.m_Is矿区编码Null;
			}
			if (propname.Equals("坐标系统")) {
				return this.m_Is坐标系统Null;
			}
			if (propname.Equals("区域坐标")) {
				return this.m_Is区域坐标Null;
			}
			if (propname.Equals("BSM")) {
				return this.m_IsBSMNull;
			}
			return true;
		}
		
		/// <summary>将某个属性设置为空</summary>
		public override void SetNull(string propname) {
			if (propname.Equals("CK_GUID")) {
				this.m_IsCK_GUIDNull = true;
				return;
			}
			if (propname.Equals("申请序号")) {
				this.m_Is申请序号Null = true;
				return;
			}
			if (propname.Equals("区域名称")) {
				this.m_Is区域名称Null = true;
				return;
			}
			if (propname.Equals("区域类别")) {
				this.m_Is区域类别Null = true;
				return;
			}
			if (propname.Equals("批准机关及文号")) {
				this.m_Is批准机关及文号Null = true;
				return;
			}
			if (propname.Equals("东经起")) {
				this.m_Is东经起Null = true;
				return;
			}
			if (propname.Equals("东经止")) {
				this.m_Is东经止Null = true;
				return;
			}
			if (propname.Equals("北纬起")) {
				this.m_Is北纬起Null = true;
				return;
			}
			if (propname.Equals("北纬止")) {
				this.m_Is北纬止Null = true;
				return;
			}
			if (propname.Equals("采深上限")) {
				this.m_Is采深上限Null = true;
				return;
			}
			if (propname.Equals("采深下限")) {
				this.m_Is采深下限Null = true;
				return;
			}
			if (propname.Equals("区域面积")) {
				this.m_Is区域面积Null = true;
				return;
			}
			if (propname.Equals("所在行政区")) {
				this.m_Is所在行政区Null = true;
				return;
			}
			if (propname.Equals("所在行政区名称")) {
				this.m_Is所在行政区名称Null = true;
				return;
			}
			if (propname.Equals("矿区编码")) {
				this.m_Is矿区编码Null = true;
				return;
			}
			if (propname.Equals("坐标系统")) {
				this.m_Is坐标系统Null = true;
				return;
			}
			if (propname.Equals("区域坐标")) {
				this.m_Is区域坐标Null = true;
				return;
			}
			if (propname.Equals("BSM")) {
				this.m_IsBSMNull = true;
				return;
			}
		}
	}
}
